package com.hsy.crm.web.web.stone;

import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.StoreCheck;
import com.hsy.crm.web.domain.vo.storeCheck.StoneCheckPageVo;
import com.hsy.crm.web.domain.vo.storeCheck.StoneCheckStonePageVo;
import com.hsy.crm.web.domain.vo.storeCheck.StoneCheckVo;
import com.hsy.crm.web.service.impl.StoreCheckService;
import com.hsy.crm.web.web.BaseAction;
import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.StoreCheck;
import com.hsy.crm.web.domain.vo.storeCheck.StoneCheckPageVo;
import com.hsy.crm.web.domain.vo.storeCheck.StoneCheckStonePageVo;
import com.hsy.crm.web.domain.vo.storeCheck.StoneCheckVo;
import com.hsy.crm.web.web.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/storeCheck")
public class StoreCheckAction extends BaseAction {

    @Autowired
    StoreCheckService storeCheckService;

    @RequestMapping("/insert")
    public String insert(StoneCheckVo stoneCheckVo) {
        return Response.body(storeCheckService.insert(stoneCheckVo));
    }

    @RequestMapping("/page")
    public String page(StoneCheckPageVo stoneCheckPageVo) {
        return Response.body(storeCheckService.page(stoneCheckPageVo));
    }

    @RequestMapping("/stonePage")
    public String stonePage(StoneCheckStonePageVo stoneCheckPageVo) {
        return Response.body(storeCheckService.stonePage(stoneCheckPageVo));
    }

    @RequestMapping("/stoneHisPage")
    public String stoneHisPage(StoneCheckStonePageVo stoneCheckPageVo) {
        return Response.body(storeCheckService.stoneHisPage(stoneCheckPageVo));
    }

    @RequestMapping("/start")
    public String start(StoreCheck storeCheck) {
        return Response.body(storeCheckService.start(storeCheck));
    }

    @RequestMapping("/end")
    public String end(StoreCheck storeCheck) {
        return Response.body(storeCheckService.end(storeCheck));
    }

    @RequestMapping("/getStoneCheckCurrStatus")
    public String getStoneCheckCurrStatus(StoreCheck storeCheck) {
        return Response.body(storeCheckService.getStoneCheckCurrStatus(storeCheck));
    }

}
